<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回指定的所有对象，包括它们各自的对象 ID</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.snmpgetnext.html">snmpgetnext</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.snmpset.html">snmpset</a></div>
 <div class="up"><a href="ref.snmp.html">SNMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.snmprealwalk" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">snmprealwalk</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">snmprealwalk</span> &mdash; <span class="dc-title">返回指定的所有对象，包括它们各自的对象 ID</span></p>

 </div>
 

<div class="refsect1 description" id="refsect1-function.snmprealwalk-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>snmprealwalk</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$community</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$object_id</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code><span class="initializer"> = 1000000</span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$retries</code><span class="initializer"> = 5</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>snmprealwalk()</strong></span> function is used to traverse over a number
   of <acronym title="Simple Network Management Protocol">SNMP</acronym> objects starting from <em><code class="parameter">object_id</code></em>
   and return not only their values but also their object ids.
  </p> 
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.snmprealwalk-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">host</code></em></dt>

     <dd>
<p class="para">The hostname of the <acronym title="Simple Network Management Protocol">SNMP</acronym> agent (server).</p></dd>

    
    
     <dt>
<em><code class="parameter">community</code></em></dt>

     <dd>
<p class="para">The read community.</p></dd>

    
    
     <dt>
<em><code class="parameter">object_id</code></em></dt>

     <dd>
<p class="para">The <acronym title="Simple Network Management Protocol">SNMP</acronym> object id which precedes the wanted one.</p></dd>

    
    
     <dt>
<em><code class="parameter">timeout</code></em></dt>

     <dd>
<p class="para">The number of microseconds until the first timeout.</p></dd>

    
    
     <dt>
<em><code class="parameter">retries</code></em></dt>

     <dd>
<p class="para">The number of times to retry if timeouts occur.</p></dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.snmprealwalk-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an associative array of the <acronym title="Simple Network Management Protocol">SNMP</acronym> object ids and their values on success or <strong><code>FALSE</code></strong> on error.
   In case of an error, an E_WARNING message is shown.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.snmprealwalk-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4474">
    <p><strong>Example #1 Using <span class="function"><strong>snmprealwalk()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">snmprealwalk</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"public"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"IF-MIB::ifName"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    
    <div class="example-contents"><p>
     The above will output something like:
<div class="cdata"><pre>     
    Array
      (
      [IF-MIB::ifName.1] =&gt; STRING: lo
      [IF-MIB::ifName.2] =&gt; STRING: eth0
      [IF-MIB::ifName.3] =&gt; STRING: eth2
      [IF-MIB::ifName.4] =&gt; STRING: sit0
      [IF-MIB::ifName.5] =&gt; STRING: sixxs
    )
</pre></div>
    </p></div>
   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.snmprealwalk-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.snmpwalk.html" class="function" rel="rdfs-seeAlso">snmpwalk()</a> - 从代理返回所有的 SNMP 对象</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.snmpgetnext.html">snmpgetnext</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.snmpset.html">snmpset</a></div>
 <div class="up"><a href="ref.snmp.html">SNMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
